The present invention relates to a method, apparatus or software for determining a set of candidate code insertions for insertion in program code.
Program code for programmable devices such as software for computers is commonly created in a code editor application program that may be provided as a standalone program or as part of an integrated development environment (IDE). Some code editors provide a facility for providing the user with suggested sections of code that may be chosen for insertion at a given point in the program code being edited. Such facilities may be referred to as a code completion (CC), code assistance (CA) or auto-complete facility and are commonly triggered by the user entering a given command. The sections of code offered to the users aim to be syntactically correct for the programming language being used. Some CA systems provide expressions that are relevant for the current namespace. In other words, expressions, such as fields or subroutine calls, are provided from within the scope relative to their insertion point in the program code.
CA systems can reduce the need for a programmer to manually search for an appropriate expression to insert. One problem however is that the appropriate or required expression may not appear in the suggestions provided by the CA system. In this case, the programmer may need to perform a manual search for the required expression.